package com.lhh.springcommon.utils;

/**
 * 信息状态码
 * @author 李厚航
 */
public enum CodeEnum {
    /**
     * 所有状态码
     */
    SUCCESS(200,"响应成功"),
    OPERATION_FAILED(400,"操作失败"),
    TOKEN_VERIFICATION_FAILED(401,"token验证失败"),
    HEADER_NOT_TOKEN(402,"请求头未携带token"),
    PHONE_NUMBER_FORMAT_ERROR(403,"手机号格式错误"),
    USERNAME_EXISTS(404,"用户名已存在"),
    ACCOUNT_EXISTS(405,"账号已存在"),
    PHONE_EXISTS(406,"手机号已注册"),
    HEADER_NOT_REQUEST_ID(407,"请求头未携带requestId"),
    UNEXPECTED_REQUEST(408,"意料之外的请求"),
    LOGIN_FAILED(409,"登录失败,账号或密码错误"),
    PHONE_NUMBER_NOT_EXISTS(410,"手机号不存在"),
    CODE_ERROR(411,"验证码错误"),
    VIDEO_ADDITION_FAILED(412,"视频添加失败"),
    FILE_UPLOAD_FAILED(413,"文件上传失败"),
    REQUEST_ERROR(500,"服务器内部异常");

    private final int code;

    private final String msg;

    CodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
